<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数据列表</title>
    <link rel="stylesheet" href="/Public/css/person.css">
    <link rel="stylesheet" href="/Public/dpa/css/page.css">
    <script src="/Public/dpa/js/jquery-2.1.4.js"></script>
    <style>
        button{
            margin-left:20px;
            margin-top:50px;
        }

        .right-container table tr td {
            padding-top:3px;
        }
    </style>
</head>
<body>
<!--加载导航条开始-->
<div class="nav-bar">
    <ul>
        <li class="in"><a href="<?php echo U('Home/Index/menu');?>">自定义菜单</a></li>
        <li class="in"><a href="<?php echo U('Home/Upload/upload');?>">上传excel</a></li>
        <li class="in"><a href="<?php echo U('Home/Index/unit');?>">单位信息管理</a></li>
        <li class="in"><a href="<?php echo U('Home/Index/personnel');?>">人员信息管理</a></li>
        <li class="on"><a href="<?php echo U('Home/Index/schedule');?>">数据管理</a></li>
        <li class="in"><a href="<?php echo U('Home/Index/connect');?>">交接数据管理</a></li>
        <li  style="background:darkcyan"> <a href="<?php echo U('Home/Index/changepass');?>">更改密码</a></li>
        <li style="background:grey"><a href="<?php echo U('Home/Index/unlogin');?>">退出登录</a></li>
    </ul>
</div>
<!--加载导航条结束-->
<div class="right-container">
    <h1>数据列表
        <a href="/Home/Index/schadd" class="add">添加</a>
        <a id="drop" href="javascript:;" class="add">清空</a>
    </h1>
    <form action="/Home/Index/schedule" method="get">
    <p>
        <span style="font-size:16px">条件查询:</span>
        <input type="text" name="dpasum" placeholder="请输入证书编号" value="<?php echo I('get.dpasum'); ?>" >
        <input type="submit" value="查询">
    </p>
    </form>
    <table border="1" style="width:100%">
        <tr >
            <th>证书编号</th>
            <th>计量状态</th>
            <th>任务单号</th>
            <th>型号规格</th>
            <th>统一编号</th>
            <th>出厂编号</th>
            <th>检定校准单位</th>
            <th>生产厂家</th>
            <th>委托单位</th>
            <th>委托人</th>
            <th>委托电话</th>
            <th>委托日期</th>
            <th>计量日期</th>
            <th>委托单位编码</th>
            <th>计量结果</th>
            <th>计量员</th>
            <th>有效期至</th>
            <th>操作</th>
        </tr>
        <?php if(is_array($list)): foreach($list as $key=>$v): ?><tr >
            <td><?php echo ($v["dpasum"]); ?></td>
            <td><?php echo ($v["status"]); ?></td>
            <td><?php echo ($v["gxsum"]); ?></td>
            <td><?php echo ($v["xhtype"]); ?></td>
            <td><?php echo ($v["norm"]); ?></td>
            <td><?php echo ($v["batch"]); ?></td>
            <td><?php echo ($v["zlgrage"]); ?></td>
            <td><?php echo ($v["output"]); ?></td>
            <td><?php echo ($v["requester"]); ?></td>
            <td><?php echo ($v["client"]); ?></td>
            <td><?php echo ($v["tel"]); ?></td>
            <td><?php echo (date('Y-m-d',$v["wtsj"])); ?></td>
            <td><?php echo (date('Y-m-d',$v["wcsj"])); ?></td>
            <td><?php echo ($v["unitsum"]); ?></td>
            <td><?php echo ($v["end"]); ?></td>
            <td><?php echo ($v["assess"]); ?></td>
            <td><?php echo ($v["remark"]); ?></td>
            <td style="width:70px">
                <a class="upd" href="<?php echo U('schupd',array('dpasum'=>$v[dpasum]));?>" >更改</a> |
                <a class="del" onclick="return confirm('您确定要删除此条数据吗?');" href="<?php echo U('schdel',array('dpasum'=>$v[dpasum]));?>" >删除</a>
            </td>
        </tr><?php endforeach; endif; ?>
    </table>
    <div class="green-black"><?php echo ($page_str); ?></div>
</div>
</body>
<script>

    $('#drop').click(function(){
        if(confirm('确定要清空数据表吗?')){
            if(confirm('清空数据表之后数据将不能恢复,请谨慎操作')){
                //return false;
                location.href = '/Home/Index/drop';
            }
        }
    })
</script>
</html>